3.8.18 \(\int \frac {(A+B \tan (e+f x)) (c-i c \tan (e+f x))^3}{(a+i a \tan (e+f x))^2} \, dx\) [718]

Optimal. Leaf size=128 \[ \frac {(A+5 i B) c^3 x}{a^2}+\frac {(i A-5 B) c^3 \log (\cos (e+f x))}{a^2 f}-\frac {2 (i A-B) c^3}{a^2 f (i-\tan (e+f x))^2}+\frac {4 (A+2 i B) c^3}{a^2 f (i-\tan (e+f x))}-\frac {i B c^3 \tan (e+f x)}{a^2 f} \]

[Out]

(A+5*I*B)*c^3*x/a^2+(I*A-5*B)*c^3*ln(cos(f*x+e))/a^2/f-2*(I*A-B)*c^3/a^2/f/(I-tan(f*x+e))^2+4*(A+2*I*B)*c^3/a^
2/f/(I-tan(f*x+e))-I*B*c^3*tan(f*x+e)/a^2/f

________________________________________________________________________________________

Rubi [A]
time = 0.13, antiderivative size = 128, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 41, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.049, Rules used = {3669, 78} \begin {gather*} \frac {4 c^3 (A+2 i B)}{a^2 f (-\tan (e+f x)+i)}-\frac {2 c^3 (-B+i A)}{a^2 f (-\tan (e+f x)+i)^2}+\frac {c^3 (-5 B+i A) \log (\cos (e+f x))}{a^2 f}+\frac {c^3 x (A+5 i B)}{a^2}-\frac {i B c^3 \tan (e+f x)}{a^2 f} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[((A + B*Tan[e + f*x])*(c - I*c*Tan[e + f*x])^3)/(a + I*a*Tan[e + f*x])^2,x]

[Out]

((A + (5*I)*B)*c^3*x)/a^2 + ((I*A - 5*B)*c^3*Log[Cos[e + f*x]])/(a^2*f) - (2*(I*A - B)*c^3)/(a^2*f*(I - Tan[e
+ f*x])^2) + (4*(A + (2*I)*B)*c^3)/(a^2*f*(I - Tan[e + f*x])) - (I*B*c^3*Tan[e + f*x])/(a^2*f)

Rule 78

Int[((a_.) + (b_.)*(x_))*((c_) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Int[ExpandIntegran
d[(a + b*x)*(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && NeQ[b*c - a*d, 0] && ((ILtQ[
n, 0] && ILtQ[p, 0]) || EqQ[p, 1] || (IGtQ[p, 0] && ( !IntegerQ[n] || LeQ[9*p + 5*(n + 2), 0] || GeQ[n + p + 1
, 0] || (GeQ[n + p + 2, 0] && RationalQ[a, b, c, d, e, f]))))

Rule 3669

Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*tan[(e_.) + (f_.)*(x_)])*((c_) + (d_.)*tan[(e_
.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Dist[a*(c/f), Subst[Int[(a + b*x)^(m - 1)*(c + d*x)^(n - 1)*(A + B*x), x
], x, Tan[e + f*x]], x] /; FreeQ[{a, b, c, d, e, f, A, B, m, n}, x] && EqQ[b*c + a*d, 0] && EqQ[a^2 + b^2, 0]

Rubi steps

\begin {align*} \int \frac {(A+B \tan (e+f x)) (c-i c \tan (e+f x))^3}{(a+i a \tan (e+f x))^2} \, dx &=\frac {(a c) \text {Subst}\left (\int \frac {(A+B x) (c-i c x)^2}{(a+i a x)^3} \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac {(a c) \text {Subst}\left (\int \left (-\frac {i B c^2}{a^3}+\frac {4 i (A+i B) c^2}{a^3 (-i+x)^3}+\frac {4 (A+2 i B) c^2}{a^3 (-i+x)^2}+\frac {(-i A+5 B) c^2}{a^3 (-i+x)}\right ) \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac {(A+5 i B) c^3 x}{a^2}+\frac {(i A-5 B) c^3 \log (\cos (e+f x))}{a^2 f}-\frac {2 (i A-B) c^3}{a^2 f (i-\tan (e+f x))^2}+\frac {4 (A+2 i B) c^3}{a^2 f (i-\tan (e+f x))}-\frac {i B c^3 \tan (e+f x)}{a^2 f}\\ \end {align*}

________________________________________________________________________________________

Mathematica [B] Both result and optimal contain complex but leaf count is larger than twice the leaf count of optimal. \(413\) vs. \(2(128)=256\).
time = 3.65, size = 413, normalized size = 3.23 \begin {gather*} -\frac {c^3 \sec (e) \sec ^2(e+f x) (\cos (f x)+i \sin (f x))^2 \left (i (A+5 i B) \cos ^3(e) \log \left (\cos ^2(e+f x)\right )-2 (A+5 i B) \cos ^2(e) \log \left (\cos ^2(e+f x)\right ) \sin (e)+2 (A+5 i B) \text {ArcTan}(\tan (f x)) \cos (e) (\cos (2 e)+i \sin (2 e))+\cos (e) \left (-2 A f x-10 i B f x-2 i A \cos (2 f x)+6 B \cos (2 f x)-i A \log \left (\cos ^2(e+f x)\right ) \sin ^2(e)+5 B \log \left (\cos ^2(e+f x)\right ) \sin ^2(e)+2 i A f x \sin (2 e)-10 B f x \sin (2 e)+A \cos (4 f x) \sin (2 e)+i B \cos (4 f x) \sin (2 e)-2 A \sin (2 f x)-6 i B \sin (2 f x)-i A \sin (2 e) \sin (4 f x)+B \sin (2 e) \sin (4 f x)+\cos (2 e) (2 (A+5 i B) f x+i (A+i B) \cos (4 f x)+(A+i B) \sin (4 f x))\right )+\sec (e+f x) (\cos (e)+i \sin (e)) (B \cos (e-f x)-B \cos (e+f x)+2 \cos (e) (i (A f x+B (-1+5 i f x)) \sin (f x)+(-i A+5 B) f x \sin (2 e+f x)))\right )}{2 a^2 f (-i+\tan (e+f x))^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[((A + B*Tan[e + f*x])*(c - I*c*Tan[e + f*x])^3)/(a + I*a*Tan[e + f*x])^2,x]

[Out]

-1/2*(c^3*Sec[e]*Sec[e + f*x]^2*(Cos[f*x] + I*Sin[f*x])^2*(I*(A + (5*I)*B)*Cos[e]^3*Log[Cos[e + f*x]^2] - 2*(A
 + (5*I)*B)*Cos[e]^2*Log[Cos[e + f*x]^2]*Sin[e] + 2*(A + (5*I)*B)*ArcTan[Tan[f*x]]*Cos[e]*(Cos[2*e] + I*Sin[2*
e]) + Cos[e]*(-2*A*f*x - (10*I)*B*f*x - (2*I)*A*Cos[2*f*x] + 6*B*Cos[2*f*x] - I*A*Log[Cos[e + f*x]^2]*Sin[e]^2
 + 5*B*Log[Cos[e + f*x]^2]*Sin[e]^2 + (2*I)*A*f*x*Sin[2*e] - 10*B*f*x*Sin[2*e] + A*Cos[4*f*x]*Sin[2*e] + I*B*C
os[4*f*x]*Sin[2*e] - 2*A*Sin[2*f*x] - (6*I)*B*Sin[2*f*x] - I*A*Sin[2*e]*Sin[4*f*x] + B*Sin[2*e]*Sin[4*f*x] + C
os[2*e]*(2*(A + (5*I)*B)*f*x + I*(A + I*B)*Cos[4*f*x] + (A + I*B)*Sin[4*f*x])) + Sec[e + f*x]*(Cos[e] + I*Sin[
e])*(B*Cos[e - f*x] - B*Cos[e + f*x] + 2*Cos[e]*(I*(A*f*x + B*(-1 + (5*I)*f*x))*Sin[f*x] + ((-I)*A + 5*B)*f*x*
Sin[2*e + f*x]))))/(a^2*f*(-I + Tan[e + f*x])^2)

________________________________________________________________________________________

Maple [A]
time = 0.24, size = 83, normalized size = 0.65

method result size
derivativedivides \(\frac {c^{3} \left (\left (-i A +5 B \right ) \ln \left (-i+\tan \left (f x +e \right )\right )-\frac {8 i B +4 A}{-i+\tan \left (f x +e \right )}-\frac {4 i A -4 B}{2 \left (-i+\tan \left (f x +e \right )\right )^{2}}-i B \tan \left (f x +e \right )\right )}{f \,a^{2}}\) \(83\)
default \(\frac {c^{3} \left (\left (-i A +5 B \right ) \ln \left (-i+\tan \left (f x +e \right )\right )-\frac {8 i B +4 A}{-i+\tan \left (f x +e \right )}-\frac {4 i A -4 B}{2 \left (-i+\tan \left (f x +e \right )\right )^{2}}-i B \tan \left (f x +e \right )\right )}{f \,a^{2}}\) \(83\)
risch \(\frac {3 c^{3} {\mathrm e}^{-2 i \left (f x +e \right )} B}{a^{2} f}-\frac {i c^{3} {\mathrm e}^{-2 i \left (f x +e \right )} A}{a^{2} f}-\frac {c^{3} {\mathrm e}^{-4 i \left (f x +e \right )} B}{2 a^{2} f}+\frac {i c^{3} {\mathrm e}^{-4 i \left (f x +e \right )} A}{2 a^{2} f}+\frac {10 i c^{3} B x}{a^{2}}+\frac {2 c^{3} A x}{a^{2}}+\frac {10 i c^{3} B e}{a^{2} f}+\frac {2 c^{3} A e}{a^{2} f}+\frac {2 c^{3} B}{f \,a^{2} \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )}-\frac {5 c^{3} \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right ) B}{a^{2} f}+\frac {i c^{3} \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right ) A}{a^{2} f}\) \(210\)
norman \(\frac {\frac {\left (5 i B \,c^{3}+A \,c^{3}\right ) x}{a}+\frac {-2 i c^{3} A +6 B \,c^{3}}{a f}+\frac {\left (5 i B \,c^{3}+A \,c^{3}\right ) x \left (\tan ^{4}\left (f x +e \right )\right )}{a}+\frac {2 \left (5 i B \,c^{3}+A \,c^{3}\right ) x \left (\tan ^{2}\left (f x +e \right )\right )}{a}-\frac {2 \left (5 i B \,c^{3}+2 A \,c^{3}\right ) \left (\tan ^{3}\left (f x +e \right )\right )}{a f}+\frac {2 \left (-3 i c^{3} A +5 B \,c^{3}\right ) \left (\tan ^{2}\left (f x +e \right )\right )}{a f}-\frac {5 i c^{3} B \tan \left (f x +e \right )}{a f}-\frac {i c^{3} B \left (\tan ^{5}\left (f x +e \right )\right )}{a f}}{a \left (1+\tan ^{2}\left (f x +e \right )\right )^{2}}+\frac {\left (-i c^{3} A +5 B \,c^{3}\right ) \ln \left (1+\tan ^{2}\left (f x +e \right )\right )}{2 a^{2} f}\) \(244\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((A+B*tan(f*x+e))*(c-I*c*tan(f*x+e))^3/(a+I*a*tan(f*x+e))^2,x,method=_RETURNVERBOSE)

[Out]

1/f*c^3/a^2*((-I*A+5*B)*ln(-I+tan(f*x+e))-(8*I*B+4*A)/(-I+tan(f*x+e))-1/2*(-4*B+4*I*A)/(-I+tan(f*x+e))^2-I*B*t
an(f*x+e))

________________________________________________________________________________________

Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: RuntimeError} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((A+B*tan(f*x+e))*(c-I*c*tan(f*x+e))^3/(a+I*a*tan(f*x+e))^2,x, algorithm="maxima")

[Out]

Exception raised: RuntimeError >> ECL says: Error executing code in Maxima: expt: undefined: 0 to a negative e
xponent.

________________________________________________________________________________________

Fricas [A]
time = 3.95, size = 185, normalized size = 1.45 \begin {gather*} \frac {4 \, {\left (A + 5 i \, B\right )} c^{3} f x e^{\left (6 i \, f x + 6 i \, e\right )} + {\left (-i \, A + 5 \, B\right )} c^{3} e^{\left (2 i \, f x + 2 i \, e\right )} + {\left (i \, A - B\right )} c^{3} + 2 \, {\left (2 \, {\left (A + 5 i \, B\right )} c^{3} f x - {\left (i \, A - 5 \, B\right )} c^{3}\right )} e^{\left (4 i \, f x + 4 i \, e\right )} - 2 \, {\left ({\left (-i \, A + 5 \, B\right )} c^{3} e^{\left (6 i \, f x + 6 i \, e\right )} + {\left (-i \, A + 5 \, B\right )} c^{3} e^{\left (4 i \, f x + 4 i \, e\right )}\right )} \log \left (e^{\left (2 i \, f x + 2 i \, e\right )} + 1\right )}{2 \, {\left (a^{2} f e^{\left (6 i \, f x + 6 i \, e\right )} + a^{2} f e^{\left (4 i \, f x + 4 i \, e\right )}\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((A+B*tan(f*x+e))*(c-I*c*tan(f*x+e))^3/(a+I*a*tan(f*x+e))^2,x, algorithm="fricas")

[Out]

1/2*(4*(A + 5*I*B)*c^3*f*x*e^(6*I*f*x + 6*I*e) + (-I*A + 5*B)*c^3*e^(2*I*f*x + 2*I*e) + (I*A - B)*c^3 + 2*(2*(
A + 5*I*B)*c^3*f*x - (I*A - 5*B)*c^3)*e^(4*I*f*x + 4*I*e) - 2*((-I*A + 5*B)*c^3*e^(6*I*f*x + 6*I*e) + (-I*A +
5*B)*c^3*e^(4*I*f*x + 4*I*e))*log(e^(2*I*f*x + 2*I*e) + 1))/(a^2*f*e^(6*I*f*x + 6*I*e) + a^2*f*e^(4*I*f*x + 4*
I*e))

________________________________________________________________________________________

Sympy [A]
time = 0.55, size = 309, normalized size = 2.41 \begin {gather*} \frac {2 B c^{3}}{a^{2} f e^{2 i e} e^{2 i f x} + a^{2} f} + \begin {cases} \frac {\left (\left (i A a^{2} c^{3} f e^{2 i e} - B a^{2} c^{3} f e^{2 i e}\right ) e^{- 4 i f x} + \left (- 2 i A a^{2} c^{3} f e^{4 i e} + 6 B a^{2} c^{3} f e^{4 i e}\right ) e^{- 2 i f x}\right ) e^{- 6 i e}}{2 a^{4} f^{2}} & \text {for}\: a^{4} f^{2} e^{6 i e} \neq 0 \\x \left (- \frac {2 A c^{3} + 10 i B c^{3}}{a^{2}} + \frac {\left (2 A c^{3} e^{4 i e} - 2 A c^{3} e^{2 i e} + 2 A c^{3} + 10 i B c^{3} e^{4 i e} - 6 i B c^{3} e^{2 i e} + 2 i B c^{3}\right ) e^{- 4 i e}}{a^{2}}\right ) & \text {otherwise} \end {cases} + \frac {i c^{3} \left (A + 5 i B\right ) \log {\left (e^{2 i f x} + e^{- 2 i e} \right )}}{a^{2} f} + \frac {x \left (2 A c^{3} + 10 i B c^{3}\right )}{a^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((A+B*tan(f*x+e))*(c-I*c*tan(f*x+e))**3/(a+I*a*tan(f*x+e))**2,x)

[Out]

2*B*c**3/(a**2*f*exp(2*I*e)*exp(2*I*f*x) + a**2*f) + Piecewise((((I*A*a**2*c**3*f*exp(2*I*e) - B*a**2*c**3*f*e
xp(2*I*e))*exp(-4*I*f*x) + (-2*I*A*a**2*c**3*f*exp(4*I*e) + 6*B*a**2*c**3*f*exp(4*I*e))*exp(-2*I*f*x))*exp(-6*
I*e)/(2*a**4*f**2), Ne(a**4*f**2*exp(6*I*e), 0)), (x*(-(2*A*c**3 + 10*I*B*c**3)/a**2 + (2*A*c**3*exp(4*I*e) -
2*A*c**3*exp(2*I*e) + 2*A*c**3 + 10*I*B*c**3*exp(4*I*e) - 6*I*B*c**3*exp(2*I*e) + 2*I*B*c**3)*exp(-4*I*e)/a**2
), True)) + I*c**3*(A + 5*I*B)*log(exp(2*I*f*x) + exp(-2*I*e))/(a**2*f) + x*(2*A*c**3 + 10*I*B*c**3)/a**2

________________________________________________________________________________________

Giac [B] Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 357 vs. \(2 (112) = 224\).
time = 0.81, size = 357, normalized size = 2.79 \begin {gather*} \frac {\frac {6 \, {\left (i \, A c^{3} - 5 \, B c^{3}\right )} \log \left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 1\right )}{a^{2}} + \frac {12 \, {\left (-i \, A c^{3} + 5 \, B c^{3}\right )} \log \left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - i\right )}{a^{2}} - \frac {6 \, {\left (-i \, A c^{3} + 5 \, B c^{3}\right )} \log \left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 1\right )}{a^{2}} - \frac {6 \, {\left (i \, A c^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - 5 \, B c^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - 2 i \, B c^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - i \, A c^{3} + 5 \, B c^{3}\right )}}{{\left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - 1\right )} a^{2}} - \frac {-25 i \, A c^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} + 125 \, B c^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} - 100 \, A c^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} - 548 i \, B c^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} + 198 i \, A c^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - 894 \, B c^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 100 \, A c^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 548 i \, B c^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 25 i \, A c^{3} + 125 \, B c^{3}}{a^{2} {\left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - i\right )}^{4}}}{6 \, f} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((A+B*tan(f*x+e))*(c-I*c*tan(f*x+e))^3/(a+I*a*tan(f*x+e))^2,x, algorithm="giac")

[Out]

1/6*(6*(I*A*c^3 - 5*B*c^3)*log(tan(1/2*f*x + 1/2*e) + 1)/a^2 + 12*(-I*A*c^3 + 5*B*c^3)*log(tan(1/2*f*x + 1/2*e
) - I)/a^2 - 6*(-I*A*c^3 + 5*B*c^3)*log(tan(1/2*f*x + 1/2*e) - 1)/a^2 - 6*(I*A*c^3*tan(1/2*f*x + 1/2*e)^2 - 5*
B*c^3*tan(1/2*f*x + 1/2*e)^2 - 2*I*B*c^3*tan(1/2*f*x + 1/2*e) - I*A*c^3 + 5*B*c^3)/((tan(1/2*f*x + 1/2*e)^2 -
1)*a^2) - (-25*I*A*c^3*tan(1/2*f*x + 1/2*e)^4 + 125*B*c^3*tan(1/2*f*x + 1/2*e)^4 - 100*A*c^3*tan(1/2*f*x + 1/2
*e)^3 - 548*I*B*c^3*tan(1/2*f*x + 1/2*e)^3 + 198*I*A*c^3*tan(1/2*f*x + 1/2*e)^2 - 894*B*c^3*tan(1/2*f*x + 1/2*
e)^2 + 100*A*c^3*tan(1/2*f*x + 1/2*e) + 548*I*B*c^3*tan(1/2*f*x + 1/2*e) - 25*I*A*c^3 + 125*B*c^3)/(a^2*(tan(1
/2*f*x + 1/2*e) - I)^4))/f

________________________________________________________________________________________

Mupad [B]
time = 9.01, size = 194, normalized size = 1.52 \begin {gather*} \frac {c^3\,\left (6\,B-A\,2{}\mathrm {i}+4\,A\,\mathrm {tan}\left (e+f\,x\right )+B\,\mathrm {tan}\left (e+f\,x\right )\,7{}\mathrm {i}-A\,\ln \left (-1-\mathrm {tan}\left (e+f\,x\right )\,1{}\mathrm {i}\right )\,1{}\mathrm {i}+5\,B\,\ln \left (-1-\mathrm {tan}\left (e+f\,x\right )\,1{}\mathrm {i}\right )+2\,B\,{\mathrm {tan}\left (e+f\,x\right )}^2+B\,{\mathrm {tan}\left (e+f\,x\right )}^3\,1{}\mathrm {i}+A\,{\mathrm {tan}\left (e+f\,x\right )}^2\,\ln \left (-1-\mathrm {tan}\left (e+f\,x\right )\,1{}\mathrm {i}\right )\,1{}\mathrm {i}-5\,B\,{\mathrm {tan}\left (e+f\,x\right )}^2\,\ln \left (-1-\mathrm {tan}\left (e+f\,x\right )\,1{}\mathrm {i}\right )+2\,A\,\mathrm {tan}\left (e+f\,x\right )\,\ln \left (-1-\mathrm {tan}\left (e+f\,x\right )\,1{}\mathrm {i}\right )+B\,\mathrm {tan}\left (e+f\,x\right )\,\ln \left (-1-\mathrm {tan}\left (e+f\,x\right )\,1{}\mathrm {i}\right )\,10{}\mathrm {i}\right )}{a^2\,f\,{\left (1+\mathrm {tan}\left (e+f\,x\right )\,1{}\mathrm {i}\right )}^2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((A + B*tan(e + f*x))*(c - c*tan(e + f*x)*1i)^3)/(a + a*tan(e + f*x)*1i)^2,x)

[Out]

(c^3*(6*B - A*2i + 4*A*tan(e + f*x) + B*tan(e + f*x)*7i - A*log(- tan(e + f*x)*1i - 1)*1i + 5*B*log(- tan(e +
f*x)*1i - 1) + 2*B*tan(e + f*x)^2 + B*tan(e + f*x)^3*1i + A*tan(e + f*x)^2*log(- tan(e + f*x)*1i - 1)*1i - 5*B
*tan(e + f*x)^2*log(- tan(e + f*x)*1i - 1) + 2*A*tan(e + f*x)*log(- tan(e + f*x)*1i - 1) + B*tan(e + f*x)*log(
- tan(e + f*x)*1i - 1)*10i))/(a^2*f*(tan(e + f*x)*1i + 1)^2)

________________________________________________________________________________________